Integrand size = 19, antiderivative size = 145 \[ \int \frac {\left (a+b x^3\right )^2 \sin (c+d x)}{x^2} \, dx=-\frac {24 b^2 \cos (c+d x)}{d^5}-\frac {2 a b x \cos (c+d x)}{d}+\frac {12 b^2 x^2 \cos (c+d x)}{d^3}-\frac {b^2 x^4 \cos (c+d x)}{d}+a^2 d \cos (c) \operatorname {CosIntegral}(d x)+\frac {2 a b \sin (c+d x)}{d^2}-\frac {a^2 \sin (c+d x)}{x}-\frac {24 b^2 x \sin (c+d x)}{d^4}+\frac {4 b^2 x^3 \sin (c+d x)}{d^2}-a^2 d \sin (c) \text {Si}(d x) \]
a^2*d*Ci(d*x)*cos(c)-24*b^2*cos(d*x+c)/d^5-2*a*b*x*cos(d*x+c)/d+12*b^2*x^2 *cos(d*x+c)/d^3-b^2*x^4*cos(d*x+c)/d-a^2*d*Si(d*x)*sin(c)+2*a*b*sin(d*x+c) /d^2-a^2*sin(d*x+c)/x-24*b^2*x*sin(d*x+c)/d^4+4*b^2*x^3*sin(d*x+c)/d^2
Time = 0.25 (sec) , antiderivative size = 145, normalized size of antiderivative = 1.00 \[ \int \frac {\left (a+b x^3\right )^2 \sin (c+d x)}{x^2} \, dx=-\frac {24 b^2 \cos (c+d x)}{d^5}-\frac {2 a b x \cos (c+d x)}{d}+\frac {12 b^2 x^2 \cos (c+d x)}{d^3}-\frac {b^2 x^4 \cos (c+d x)}{d}+a^2 d \cos (c) \operatorname {CosIntegral}(d x)+\frac {2 a b \sin (c+d x)}{d^2}-\frac {a^2 \sin (c+d x)}{x}-\frac {24 b^2 x \sin (c+d x)}{d^4}+\frac {4 b^2 x^3 \sin (c+d x)}{d^2}-a^2 d \sin (c) \text {Si}(d x) \]
(-24*b^2*Cos[c + d*x])/d^5 - (2*a*b*x*Cos[c + d*x])/d + (12*b^2*x^2*Cos[c + d*x])/d^3 - (b^2*x^4*Cos[c + d*x])/d + a^2*d*Cos[c]*CosIntegral[d*x] + ( 2*a*b*Sin[c + d*x])/d^2 - (a^2*Sin[c + d*x])/x - (24*b^2*x*Sin[c + d*x])/d ^4 + (4*b^2*x^3*Sin[c + d*x])/d^2 - a^2*d*Sin[c]*SinIntegral[d*x]
Time = 0.41 (sec) , antiderivative size = 145, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {3820, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\left (a+b x^3\right )^2 \sin (c+d x)}{x^2} \, dx\) |
\(\Big \downarrow \) 3820 |
\(\displaystyle \int \left (\frac {a^2 \sin (c+d x)}{x^2}+2 a b x \sin (c+d x)+b^2 x^4 \sin (c+d x)\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle a^2 d \cos (c) \operatorname {CosIntegral}(d x)-a^2 d \sin (c) \text {Si}(d x)-\frac {a^2 \sin (c+d x)}{x}+\frac {2 a b \sin (c+d x)}{d^2}-\frac {2 a b x \cos (c+d x)}{d}-\frac {24 b^2 \cos (c+d x)}{d^5}-\frac {24 b^2 x \sin (c+d x)}{d^4}+\frac {12 b^2 x^2 \cos (c+d x)}{d^3}+\frac {4 b^2 x^3 \sin (c+d x)}{d^2}-\frac {b^2 x^4 \cos (c+d x)}{d}\) |
(-24*b^2*Cos[c + d*x])/d^5 - (2*a*b*x*Cos[c + d*x])/d + (12*b^2*x^2*Cos[c + d*x])/d^3 - (b^2*x^4*Cos[c + d*x])/d + a^2*d*Cos[c]*CosIntegral[d*x] + ( 2*a*b*Sin[c + d*x])/d^2 - (a^2*Sin[c + d*x])/x - (24*b^2*x*Sin[c + d*x])/d ^4 + (4*b^2*x^3*Sin[c + d*x])/d^2 - a^2*d*Sin[c]*SinIntegral[d*x]
3.1.90.3.1 Defintions of rubi rules used
Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*Sin[(c_.) + (d_.)*(x_ )], x_Symbol] :> Int[ExpandIntegrand[Sin[c + d*x], (e*x)^m*(a + b*x^n)^p, x ], x] /; FreeQ[{a, b, c, d, e, m, n}, x] && IGtQ[p, 0]
Result contains higher order function than in optimal. Order 9 vs. order 4.
Time = 0.49 (sec) , antiderivative size = 214, normalized size of antiderivative = 1.48
method | result | size |
risch | \(-\frac {-\pi \,\operatorname {csgn}\left (d x \right ) \sin \left (c \right ) a^{2} d^{6} x +2 \,\operatorname {Si}\left (d x \right ) \sin \left (c \right ) a^{2} d^{6} x -i \pi \,\operatorname {csgn}\left (d x \right ) \cos \left (c \right ) a^{2} d^{6} x +2 \cos \left (d x +c \right ) b^{2} d^{4} x^{5}+2 i \operatorname {Si}\left (d x \right ) \cos \left (c \right ) a^{2} d^{6} x +2 \,\operatorname {Ei}_{1}\left (-i d x \right ) \cos \left (c \right ) a^{2} d^{6} x -8 \sin \left (d x +c \right ) b^{2} d^{3} x^{4}+4 \cos \left (d x +c \right ) a b \,d^{4} x^{2}+2 \sin \left (d x +c \right ) a^{2} d^{5}-24 \cos \left (d x +c \right ) b^{2} d^{2} x^{3}-4 \sin \left (d x +c \right ) a b \,d^{3} x +48 \sin \left (d x +c \right ) b^{2} d \,x^{2}+48 \cos \left (d x +c \right ) b^{2} x}{2 x \,d^{5}}\) | \(214\) |
meijerg | \(\frac {16 b^{2} \sqrt {\pi }\, \sin \left (c \right ) \left (-\frac {x \left (d^{2}\right )^{\frac {5}{2}} \left (-\frac {5 d^{2} x^{2}}{2}+15\right ) \cos \left (d x \right )}{10 \sqrt {\pi }\, d^{4}}+\frac {\left (d^{2}\right )^{\frac {5}{2}} \left (\frac {5}{8} d^{4} x^{4}-\frac {15}{2} d^{2} x^{2}+15\right ) \sin \left (d x \right )}{10 \sqrt {\pi }\, d^{5}}\right )}{d^{4} \sqrt {d^{2}}}+\frac {16 b^{2} \sqrt {\pi }\, \cos \left (c \right ) \left (\frac {3}{2 \sqrt {\pi }}-\frac {\left (\frac {3}{8} d^{4} x^{4}-\frac {9}{2} d^{2} x^{2}+9\right ) \cos \left (d x \right )}{6 \sqrt {\pi }}-\frac {d x \left (-\frac {3 d^{2} x^{2}}{2}+9\right ) \sin \left (d x \right )}{6 \sqrt {\pi }}\right )}{d^{5}}+\frac {4 a b \sqrt {\pi }\, \sin \left (c \right ) \left (-\frac {1}{2 \sqrt {\pi }}+\frac {\cos \left (d x \right )}{2 \sqrt {\pi }}+\frac {d x \sin \left (d x \right )}{2 \sqrt {\pi }}\right )}{d^{2}}+\frac {4 a b \sqrt {\pi }\, \cos \left (c \right ) \left (-\frac {d x \cos \left (d x \right )}{2 \sqrt {\pi }}+\frac {\sin \left (d x \right )}{2 \sqrt {\pi }}\right )}{d^{2}}+\frac {a^{2} \sqrt {\pi }\, \sin \left (c \right ) d^{2} \left (-\frac {4 d^{2} \cos \left (x \sqrt {d^{2}}\right )}{x \left (d^{2}\right )^{\frac {3}{2}} \sqrt {\pi }}-\frac {4 \,\operatorname {Si}\left (x \sqrt {d^{2}}\right )}{\sqrt {\pi }}\right )}{4 \sqrt {d^{2}}}+\frac {a^{2} \sqrt {\pi }\, \cos \left (c \right ) d \left (\frac {4 \gamma -4+4 \ln \left (x \right )+4 \ln \left (d \right )}{\sqrt {\pi }}+\frac {4}{\sqrt {\pi }}-\frac {4 \gamma }{\sqrt {\pi }}-\frac {4 \ln \left (2\right )}{\sqrt {\pi }}-\frac {4 \ln \left (\frac {d x}{2}\right )}{\sqrt {\pi }}-\frac {4 \sin \left (d x \right )}{\sqrt {\pi }\, d x}+\frac {4 \,\operatorname {Ci}\left (d x \right )}{\sqrt {\pi }}\right )}{4}\) | \(360\) |
derivativedivides | \(d \left (-\frac {15 b^{2} c^{4} \cos \left (d x +c \right )}{d^{6}}+a^{2} \left (-\frac {\sin \left (d x +c \right )}{d x}-\operatorname {Si}\left (d x \right ) \sin \left (c \right )+\operatorname {Ci}\left (d x \right ) \cos \left (c \right )\right )+\frac {15 \left (3 c^{2}+2 c +1\right ) c^{2} b^{2} \left (-\left (d x +c \right )^{2} \cos \left (d x +c \right )+2 \cos \left (d x +c \right )+2 \left (d x +c \right ) \sin \left (d x +c \right )\right )}{d^{6}}+\frac {2 \left (2 c +1\right ) a b \left (\sin \left (d x +c \right )-\cos \left (d x +c \right ) \left (d x +c \right )\right )}{d^{3}}-\frac {20 b^{2} c^{3} \left (2 c +1\right ) \left (\sin \left (d x +c \right )-\cos \left (d x +c \right ) \left (d x +c \right )\right )}{d^{6}}-\frac {6 c \,b^{2} \left (4 c^{3}+3 c^{2}+2 c +1\right ) \left (-\left (d x +c \right )^{3} \cos \left (d x +c \right )+3 \left (d x +c \right )^{2} \sin \left (d x +c \right )-6 \sin \left (d x +c \right )+6 \cos \left (d x +c \right ) \left (d x +c \right )\right )}{d^{6}}+\frac {6 a b c \cos \left (d x +c \right )}{d^{3}}+\frac {\left (5 c^{4}+4 c^{3}+3 c^{2}+2 c +1\right ) b^{2} \left (-\left (d x +c \right )^{4} \cos \left (d x +c \right )+4 \left (d x +c \right )^{3} \sin \left (d x +c \right )+12 \left (d x +c \right )^{2} \cos \left (d x +c \right )-24 \cos \left (d x +c \right )-24 \left (d x +c \right ) \sin \left (d x +c \right )\right )}{d^{6}}\right )\) | \(365\) |
default | \(d \left (-\frac {15 b^{2} c^{4} \cos \left (d x +c \right )}{d^{6}}+a^{2} \left (-\frac {\sin \left (d x +c \right )}{d x}-\operatorname {Si}\left (d x \right ) \sin \left (c \right )+\operatorname {Ci}\left (d x \right ) \cos \left (c \right )\right )+\frac {15 \left (3 c^{2}+2 c +1\right ) c^{2} b^{2} \left (-\left (d x +c \right )^{2} \cos \left (d x +c \right )+2 \cos \left (d x +c \right )+2 \left (d x +c \right ) \sin \left (d x +c \right )\right )}{d^{6}}+\frac {2 \left (2 c +1\right ) a b \left (\sin \left (d x +c \right )-\cos \left (d x +c \right ) \left (d x +c \right )\right )}{d^{3}}-\frac {20 b^{2} c^{3} \left (2 c +1\right ) \left (\sin \left (d x +c \right )-\cos \left (d x +c \right ) \left (d x +c \right )\right )}{d^{6}}-\frac {6 c \,b^{2} \left (4 c^{3}+3 c^{2}+2 c +1\right ) \left (-\left (d x +c \right )^{3} \cos \left (d x +c \right )+3 \left (d x +c \right )^{2} \sin \left (d x +c \right )-6 \sin \left (d x +c \right )+6 \cos \left (d x +c \right ) \left (d x +c \right )\right )}{d^{6}}+\frac {6 a b c \cos \left (d x +c \right )}{d^{3}}+\frac {\left (5 c^{4}+4 c^{3}+3 c^{2}+2 c +1\right ) b^{2} \left (-\left (d x +c \right )^{4} \cos \left (d x +c \right )+4 \left (d x +c \right )^{3} \sin \left (d x +c \right )+12 \left (d x +c \right )^{2} \cos \left (d x +c \right )-24 \cos \left (d x +c \right )-24 \left (d x +c \right ) \sin \left (d x +c \right )\right )}{d^{6}}\right )\) | \(365\) |
-1/2/x/d^5*(-Pi*csgn(d*x)*sin(c)*a^2*d^6*x+2*Si(d*x)*sin(c)*a^2*d^6*x-I*Pi *csgn(d*x)*cos(c)*a^2*d^6*x+2*cos(d*x+c)*b^2*d^4*x^5+2*I*Si(d*x)*cos(c)*a^ 2*d^6*x+2*Ei(1,-I*d*x)*cos(c)*a^2*d^6*x-8*sin(d*x+c)*b^2*d^3*x^4+4*cos(d*x +c)*a*b*d^4*x^2+2*sin(d*x+c)*a^2*d^5-24*cos(d*x+c)*b^2*d^2*x^3-4*sin(d*x+c )*a*b*d^3*x+48*sin(d*x+c)*b^2*d*x^2+48*cos(d*x+c)*b^2*x)
Time = 0.26 (sec) , antiderivative size = 127, normalized size of antiderivative = 0.88 \[ \int \frac {\left (a+b x^3\right )^2 \sin (c+d x)}{x^2} \, dx=\frac {a^{2} d^{6} x \cos \left (c\right ) \operatorname {Ci}\left (d x\right ) - a^{2} d^{6} x \sin \left (c\right ) \operatorname {Si}\left (d x\right ) - {\left (b^{2} d^{4} x^{5} + 2 \, a b d^{4} x^{2} - 12 \, b^{2} d^{2} x^{3} + 24 \, b^{2} x\right )} \cos \left (d x + c\right ) + {\left (4 \, b^{2} d^{3} x^{4} - a^{2} d^{5} + 2 \, a b d^{3} x - 24 \, b^{2} d x^{2}\right )} \sin \left (d x + c\right )}{d^{5} x} \]
(a^2*d^6*x*cos(c)*cos_integral(d*x) - a^2*d^6*x*sin(c)*sin_integral(d*x) - (b^2*d^4*x^5 + 2*a*b*d^4*x^2 - 12*b^2*d^2*x^3 + 24*b^2*x)*cos(d*x + c) + (4*b^2*d^3*x^4 - a^2*d^5 + 2*a*b*d^3*x - 24*b^2*d*x^2)*sin(d*x + c))/(d^5* x)
\[ \int \frac {\left (a+b x^3\right )^2 \sin (c+d x)}{x^2} \, dx=\int \frac {\left (a + b x^{3}\right )^{2} \sin {\left (c + d x \right )}}{x^{2}}\, dx \]
Result contains complex when optimal does not.
Time = 6.47 (sec) , antiderivative size = 129, normalized size of antiderivative = 0.89 \[ \int \frac {\left (a+b x^3\right )^2 \sin (c+d x)}{x^2} \, dx=\frac {{\left (a^{2} {\left (\Gamma \left (-1, i \, d x\right ) + \Gamma \left (-1, -i \, d x\right )\right )} \cos \left (c\right ) + a^{2} {\left (-i \, \Gamma \left (-1, i \, d x\right ) + i \, \Gamma \left (-1, -i \, d x\right )\right )} \sin \left (c\right )\right )} d^{6} - 2 \, {\left (b^{2} d^{4} x^{4} + 2 \, a b d^{4} x - 12 \, b^{2} d^{2} x^{2} + 24 \, b^{2}\right )} \cos \left (d x + c\right ) + 4 \, {\left (2 \, b^{2} d^{3} x^{3} + a b d^{3} - 12 \, b^{2} d x\right )} \sin \left (d x + c\right )}{2 \, d^{5}} \]
1/2*((a^2*(gamma(-1, I*d*x) + gamma(-1, -I*d*x))*cos(c) + a^2*(-I*gamma(-1 , I*d*x) + I*gamma(-1, -I*d*x))*sin(c))*d^6 - 2*(b^2*d^4*x^4 + 2*a*b*d^4*x - 12*b^2*d^2*x^2 + 24*b^2)*cos(d*x + c) + 4*(2*b^2*d^3*x^3 + a*b*d^3 - 12 *b^2*d*x)*sin(d*x + c))/d^5
Result contains higher order function than in optimal. Order 9 vs. order 4.
Time = 0.34 (sec) , antiderivative size = 2038, normalized size of antiderivative = 14.06 \[ \int \frac {\left (a+b x^3\right )^2 \sin (c+d x)}{x^2} \, dx=\text {Too large to display} \]
1/2*(2*b^2*d^4*x^5*tan(1/2*d*x + 1/2*c)^2*tan(1/2*d*x)^2*tan(1/2*c)^2 - a^ 2*d^6*x*real_part(cos_integral(d*x))*tan(1/2*d*x + 1/2*c)^2*tan(1/2*d*x)^2 *tan(1/2*c)^2 - a^2*d^6*x*real_part(cos_integral(-d*x))*tan(1/2*d*x + 1/2* c)^2*tan(1/2*d*x)^2*tan(1/2*c)^2 + 2*b^2*d^4*x^5*tan(1/2*d*x + 1/2*c)^2*ta n(1/2*d*x)^2 - 2*a^2*d^6*x*imag_part(cos_integral(d*x))*tan(1/2*d*x + 1/2* c)^2*tan(1/2*d*x)^2*tan(1/2*c) + 2*a^2*d^6*x*imag_part(cos_integral(-d*x)) *tan(1/2*d*x + 1/2*c)^2*tan(1/2*d*x)^2*tan(1/2*c) - 4*a^2*d^6*x*sin_integr al(d*x)*tan(1/2*d*x + 1/2*c)^2*tan(1/2*d*x)^2*tan(1/2*c) + 2*b^2*d^4*x^5*t an(1/2*d*x + 1/2*c)^2*tan(1/2*c)^2 - 2*b^2*d^4*x^5*tan(1/2*d*x)^2*tan(1/2* c)^2 + a^2*d^6*x*real_part(cos_integral(d*x))*tan(1/2*d*x + 1/2*c)^2*tan(1 /2*d*x)^2 + a^2*d^6*x*real_part(cos_integral(-d*x))*tan(1/2*d*x + 1/2*c)^2 *tan(1/2*d*x)^2 - a^2*d^6*x*real_part(cos_integral(d*x))*tan(1/2*d*x + 1/2 *c)^2*tan(1/2*c)^2 - a^2*d^6*x*real_part(cos_integral(-d*x))*tan(1/2*d*x + 1/2*c)^2*tan(1/2*c)^2 - a^2*d^6*x*real_part(cos_integral(d*x))*tan(1/2*d* x)^2*tan(1/2*c)^2 - a^2*d^6*x*real_part(cos_integral(-d*x))*tan(1/2*d*x)^2 *tan(1/2*c)^2 + 16*b^2*d^3*x^4*tan(1/2*d*x + 1/2*c)*tan(1/2*d*x)^2*tan(1/2 *c)^2 + 4*a*b*d^4*x^2*tan(1/2*d*x + 1/2*c)^2*tan(1/2*d*x)^2*tan(1/2*c)^2 + 2*b^2*d^4*x^5*tan(1/2*d*x + 1/2*c)^2 - 2*b^2*d^4*x^5*tan(1/2*d*x)^2 - 2*a ^2*d^6*x*imag_part(cos_integral(d*x))*tan(1/2*d*x + 1/2*c)^2*tan(1/2*c) + 2*a^2*d^6*x*imag_part(cos_integral(-d*x))*tan(1/2*d*x + 1/2*c)^2*tan(1/...
Timed out. \[ \int \frac {\left (a+b x^3\right )^2 \sin (c+d x)}{x^2} \, dx=\int \frac {\sin \left (c+d\,x\right )\,{\left (b\,x^3+a\right )}^2}{x^2} \,d x \]